{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 泰坦尼克乘客生存预测"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据集加载"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_data shape: (891, 12)\n",
      "test_data shape: (418, 11)\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import os\n",
    "\n",
    "base_dir=r'./titanic/'\n",
    "train_dir=os.path.join(base_dir,'train.csv')\n",
    "test_dir=os.path.join(base_dir,'test.csv')\n",
    "\n",
    "train_data=pd.read_csv(train_dir)\n",
    "test_data=pd.read_csv(test_dir)\n",
    "\n",
    "print('train_data shape:',train_data.shape)\n",
    "print('test_data shape:',test_data.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据探索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 891 entries, 0 to 890\n",
      "Data columns (total 12 columns):\n",
      "PassengerId    891 non-null int64\n",
      "Survived       891 non-null int64\n",
      "Pclass         891 non-null int64\n",
      "Name           891 non-null object\n",
      "Sex            891 non-null object\n",
      "Age            714 non-null float64\n",
      "SibSp          891 non-null int64\n",
      "Parch          891 non-null int64\n",
      "Ticket         891 non-null object\n",
      "Fare           891 non-null float64\n",
      "Cabin          204 non-null object\n",
      "Embarked       889 non-null object\n",
      "dtypes: float64(2), int64(5), object(5)\n",
      "memory usage: 83.6+ KB\n",
      "None\n",
      "------------------------------\n",
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 418 entries, 0 to 417\n",
      "Data columns (total 11 columns):\n",
      "PassengerId    418 non-null int64\n",
      "Pclass         418 non-null int64\n",
      "Name           418 non-null object\n",
      "Sex            418 non-null object\n",
      "Age            332 non-null float64\n",
      "SibSp          418 non-null int64\n",
      "Parch          418 non-null int64\n",
      "Ticket         418 non-null object\n",
      "Fare           417 non-null float64\n",
      "Cabin          91 non-null object\n",
      "Embarked       418 non-null object\n",
      "dtypes: float64(2), int64(4), object(5)\n",
      "memory usage: 36.0+ KB\n",
      "None\n",
      "------------------------------\n",
      "       PassengerId    Survived      Pclass         Age       SibSp  \\\n",
      "count   891.000000  891.000000  891.000000  714.000000  891.000000   \n",
      "mean    446.000000    0.383838    2.308642   29.699118    0.523008   \n",
      "std     257.353842    0.486592    0.836071   14.526497    1.102743   \n",
      "min       1.000000    0.000000    1.000000    0.420000    0.000000   \n",
      "25%     223.500000    0.000000    2.000000   20.125000    0.000000   \n",
      "50%     446.000000    0.000000    3.000000   28.000000    0.000000   \n",
      "75%     668.500000    1.000000    3.000000   38.000000    1.000000   \n",
      "max     891.000000    1.000000    3.000000   80.000000    8.000000   \n",
      "\n",
      "            Parch        Fare  \n",
      "count  891.000000  891.000000  \n",
      "mean     0.381594   32.204208  \n",
      "std      0.806057   49.693429  \n",
      "min      0.000000    0.000000  \n",
      "25%      0.000000    7.910400  \n",
      "50%      0.000000   14.454200  \n",
      "75%      0.000000   31.000000  \n",
      "max      6.000000  512.329200  \n",
      "------------------------------\n",
      "                           Name   Sex  Ticket Cabin Embarked\n",
      "count                       891   891     891   204      889\n",
      "unique                      891     2     681   147        3\n",
      "top     Masselmani, Mrs. Fatima  male  347082    G6        S\n",
      "freq                          1   577       7     4      644\n",
      "------------------------------\n",
      "   PassengerId  Survived  Pclass  \\\n",
      "0            1         0       3   \n",
      "1            2         1       1   \n",
      "2            3         1       3   \n",
      "3            4         1       1   \n",
      "4            5         0       3   \n",
      "\n",
      "                                                Name     Sex   Age  SibSp  \\\n",
      "0                            Braund, Mr. Owen Harris    male  22.0      1   \n",
      "1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0      1   \n",
      "2                             Heikkinen, Miss. Laina  female  26.0      0   \n",
      "3       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0      1   \n",
      "4                           Allen, Mr. William Henry    male  35.0      0   \n",
      "\n",
      "   Parch            Ticket     Fare Cabin Embarked  \n",
      "0      0         A/5 21171   7.2500   NaN        S  \n",
      "1      0          PC 17599  71.2833   C85        C  \n",
      "2      0  STON/O2. 3101282   7.9250   NaN        S  \n",
      "3      0            113803  53.1000  C123        S  \n",
      "4      0            373450   8.0500   NaN        S  \n",
      "------------------------------\n",
      "     PassengerId  Survived  Pclass                                      Name  \\\n",
      "886          887         0       2                     Montvila, Rev. Juozas   \n",
      "887          888         1       1              Graham, Miss. Margaret Edith   \n",
      "888          889         0       3  Johnston, Miss. Catherine Helen \"Carrie\"   \n",
      "889          890         1       1                     Behr, Mr. Karl Howell   \n",
      "890          891         0       3                       Dooley, Mr. Patrick   \n",
      "\n",
      "        Sex   Age  SibSp  Parch      Ticket   Fare Cabin Embarked  \n",
      "886    male  27.0      0      0      211536  13.00   NaN        S  \n",
      "887  female  19.0      0      0      112053  30.00   B42        S  \n",
      "888  female   NaN      1      2  W./C. 6607  23.45   NaN        S  \n",
      "889    male  26.0      0      0      111369  30.00  C148        C  \n",
      "890    male  32.0      0      0      370376   7.75   NaN        Q  \n"
     ]
    }
   ],
   "source": [
    "# 数据信息\n",
    "print(train_data.info())\n",
    "print('-'*30)\n",
    "print(test_data.info())\n",
    "print('-'*30)\n",
    "print(train_data.describe())\n",
    "print('-'*30)\n",
    "print(train_data.describe(include=['O']))\n",
    "print('-'*30)\n",
    "print(train_data.head())\n",
    "print('-'*30)\n",
    "print(train_data.tail())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 观察以上数据发现Age、Cabin和Embarked三个字段有缺失，计算出相应缺失率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Age字段缺失率： 0.19865319865319864 0.20574162679425834\n",
      "Cabin字段缺失率： 0.771043771043771 0.7822966507177034\n",
      "Embarked字段缺失率： 0.002244668911335568 0.0\n"
     ]
    }
   ],
   "source": [
    "## 字段缺失率\n",
    "train_age_missing_rate=1-np.sum(train_data['Age'].value_counts())/train_data.shape[0]\n",
    "train_cabin_missing_rate=1-np.sum(train_data['Cabin'].value_counts())/train_data.shape[0]\n",
    "train_embarked_missing_rate=1-np.sum(train_data['Embarked'].value_counts())/train_data.shape[0]\n",
    "\n",
    "test_age_missing_rate=1-np.sum(test_data['Age'].value_counts())/test_data.shape[0]\n",
    "test_cabin_missing_rate=1-np.sum(test_data['Cabin'].value_counts())/test_data.shape[0]\n",
    "test_embarked_missing_rate=1-np.sum(test_data['Embarked'].value_counts())/test_data.shape[0]\n",
    "\n",
    "print('Age字段缺失率：',train_age_missing_rate,test_age_missing_rate)\n",
    "print('Cabin字段缺失率：',train_cabin_missing_rate,test_cabin_missing_rate)\n",
    "print('Embarked字段缺失率：',train_embarked_missing_rate,test_embarked_missing_rate)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据清洗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 对年龄使用均值填充\n",
    "train_data['Age'].fillna(train_data['Age'].mean(),inplace=True)\n",
    "test_data['Age'].fillna(test_data['Age'].mean(),inplace=True)\n",
    "\n",
    "# 对Fare使用均值填充\n",
    "train_data['Fare'].fillna(train_data['Fare'].mean(),inplace=True)\n",
    "test_data['Fare'].fillna(test_data['Fare'].mean(),inplace=True)\n",
    "\n",
    "# 对Embarked使用众数填充\n",
    "train_data['Embarked'].fillna('S',inplace=True)\n",
    "test_data['Embarked'].fillna('S',inplace=True)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 特征选择"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "features=['Pclass','Sex','Age','SibSp','Parch','Fare','Embarked']\n",
    "train_features=train_data[features]\n",
    "test_features=test_data[features]\n",
    "train_labels=train_data['Survived']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 特征数值化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['Age', 'Embarked=C', 'Embarked=Q', 'Embarked=S', 'Fare', 'Parch', 'Pclass', 'Sex=female', 'Sex=male', 'SibSp']\n"
     ]
    }
   ],
   "source": [
    "from sklearn.feature_extraction import DictVectorizer\n",
    "dvec=DictVectorizer(sparse=False)\n",
    "train_features=dvec.fit_transform(train_features.to_dict(orient='record'))\n",
    "\n",
    "print(dvec.feature_names_)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 决策树模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.tree import DecisionTreeClassifier\n",
    "\n",
    "clf=DecisionTreeClassifier(criterion='entropy')\n",
    "fit=clf.fit(train_features,train_labels)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 可视化决策树"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn import tree\n",
    "import graphviz\n",
    "import pydotplus\n",
    "from PIL.Image import Image\n",
    "\n",
    "dot_tree = tree.export_graphviz(clf,out_file=None)\n",
    "graph = pydotplus.graph_from_dot_data(dot_tree)\n",
    "graph.write_svg('decison_tree.svg')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 模型预测& 评估"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(418,)\n"
     ]
    }
   ],
   "source": [
    "test_features=dvec.fit_transform(test_features.to_dict(orient='record'))\n",
    "pred_labels=clf.predict(test_features)\n",
    "print(pred_labels.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "score 准确率为 0.9820\n"
     ]
    }
   ],
   "source": [
    "acc_decision_tree=round(clf.score(train_features,train_labels),6)\n",
    "print('score 准确率为 %.4lf' %acc_decision_tree)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### K折交叉验证"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7813\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "from sklearn.model_selection import cross_val_score\n",
    "\n",
    "score=np.mean(cross_val_score(clf,train_features,train_labels,cv=10))\n",
    "print('{:.4f}'.format(score))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### ROC曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(891, 1)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_labels=train_labels.values\n",
    "train_labels=train_labels.reshape((train_labels.shape[0],1))\n",
    "train_labels.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(891, 2)\n",
      "[[0 0]\n",
      " [0 1]\n",
      " [0 1]\n",
      " [0 1]\n",
      " [0 0]\n",
      " [0 0]\n",
      " [0 0]\n",
      " [0 0]\n",
      " [0 1]\n",
      " [0 1]]\n"
     ]
    }
   ],
   "source": [
    "from sklearn.preprocessing import label_binarize\n",
    "from matplotlib import pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "y_true=label_binarize(train_labels,classes=[3,2,1])\n",
    "y_true=y_true[:,1:3]\n",
    "print(y_true.shape)\n",
    "print(y_true[:10,:])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEWCAYAAAB42tAoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xd4FGXXwOHfofdeFJAmSG8SkC5ItWEDQWwgvoiCBTtg\nRd7XDoggiIroZ0HFgiJKVYpI71WQGkAISAsESDnfHzMJS0jZhOxOsjn3deVKpp+Z7O7ZeWbOM6Kq\nGGOMMcnJ4XUAxhhjMjdLFMYYY1JkicIYY0yKLFEYY4xJkSUKY4wxKbJEYYwxJkWWKEKAiNwpIjO9\njsNrIlJRRCJFJGcQt1lZRFREcgVrm4EkIhtEpG06lgvZ16CItBWRcK/j8JIligwmIjtFJMr9wPpH\nRCaJSKFAblNVP1fVToHcRmbkHusO8cOqultVC6lqrJdxecVNWNUuZh2qWkdVf09lOxckx+z6Gswu\nLFEExo2qWghoCDQCBnscT7p4+S05VL6hp4Udb5NZWaIIIFX9B5iBkzAAEJG8IvKWiOwWkQMiMl5E\n8vtMv0lEVovIcRH5W0S6uOOLishHIrJfRPaKyPD4JhYR6S0iC92/x4nIW75xiMhUEXnc/buciHwr\nIhEiskNEHvGZ7yURmSIin4nIcaB34n1y4/jUXX6XiDwnIjl84vhDRMaIyDER2Swi7RMtm9I+/CEi\nI0XkMPCSiFwuInNF5LCIHBKRz0WkmDv//wEVgZ/cs7enE3/TFZHfReQVd70nRGSmiJTyiecedx8O\ni8jzic9QEu13fhF5253/mIgs9P2/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LWmRbNesVezTAN5Legsc\nIpd8/ED25B9IegfMk22Zf4qIdTJd815JHf0FTJA33WYZ7wnVPf5JYKL1MvuvcVfJuO/hiHhRPut5\nnuXdxzXgUkQsAm/Ip5Rpsp3VchOYk/QoIlbIf2TdKcd5Sl5Ps46cHmtmZrX8RGFmZrVcKMzMrJYL\nhZmZ1XKhMDOzWi4UZmZWy4XCzMxquVCYmVmt38tdLxdNo3XPAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x151e96eeef0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.metrics import roc_curve, auc\n",
    "\n",
    "y_score=clf.predict_proba(train_features)\n",
    "\n",
    "fpr,tpr,threshold = roc_curve(y_true.ravel(), y_score.ravel()) \n",
    "roc_auc = auc(fpr,tpr)\n",
    " \n",
    "plt.figure()\n",
    "plt.plot(fpr, tpr, color='darkorange',label='ROC curve (area = %0.2f)' % roc_auc) \n",
    "plt.plot([0, 1], [0, 1], color='navy', linestyle='--')\n",
    "plt.xlim([0.0, 1.0])\n",
    "plt.ylim([0.0, 1.05])\n",
    "plt.xlabel('False Positive Rate')\n",
    "plt.ylabel('True Positive Rate')\n",
    "plt.title('Receiver operating characteristic example')\n",
    "plt.legend(loc=\"lower right\")\n",
    "plt.savefig('roc.svg')\n",
    "plt.show()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
